home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / MAIL.SWG / 0001_MAILMSGR.PAS.pas next >
Pascal/Delphi Source File  |  1993-05-28  |  2KB  |  70 lines

  1. {
  2. After lots of controversy, and a lot of reteaching myself the meanings of
  3. a few Words, I've redone my *.MSG reader....
  4. }
  5.  
  6. Const MSGPRIVATE  = $0001;
  7. Const MSGConst    = $0002;
  8. Const MSGREAD     = $0004;
  9. Const MSGSENT     = $0008;
  10. Const MSGFile     = $0010;
  11. Const MSGFWD      = $0020;
  12. Const MSGorPHAN   = $0040;
  13. Const MSGKILL     = $0080;
  14. Const MSGLOCAL    = $0100;
  15. Const MSGHOLD     = $0200;
  16. Const MSGCRAP     = $0400;
  17. Const MSGFRQ      = $0800;
  18. Const MSGRRQ      = $1000;
  19. Const MSGCPT      = $2000;
  20. Const MSGARQ      = $4000;
  21. Const MSGURQ      = $8000;
  22.  
  23. Type
  24.      Fido_FromType    = Array [1..35] of Char;
  25.      Fido_toType      = Array [1..35] of Char;
  26.      Fido_SubType     = Array [1..71] of Char;
  27.      Fido_DateType    = Array [1..19] of Char;
  28.  
  29.      FidoMsgType = Record
  30.       From         : Fido_FromType; (* 0   *)
  31.       toWhom       : Fido_toType;   (* 35  *)
  32.       Subject      : Fido_SubType;  (* 71  *)
  33.       AZDate       : Fido_DateType; (* 142 *)
  34.       TimesRead    : Word;          (* 162 *)
  35.       Dest_Node    : Word;          (* 164 *)
  36.       orig_Node    : Word;          (* 166 *)
  37.       Cost         : Word;          (* 168 *)
  38.       orig_Net     : Word;          (* 170 *)
  39.       Dest_Net     : Word;          (* 172 *)
  40.       Date_Written : LongInt;       (* 176 *)
  41.       Date_Arrived : LongInt;       (* 180 *)
  42.       Reply        : Word;          (* 184 *)
  43.       Attr         : Word;          (* 186 *)
  44.       Up           : Word;          (* 188 *)
  45.      end;
  46.  
  47.    MsgTxtPtr  = ^MsgTxtType;
  48.    MsgTxtType = Array [1..65535] of Char;
  49.  
  50. Var
  51.   MessageFile : File;
  52.   Msg         : FidoMsgType;
  53.   MsgTxt      : MsgTxtPtr;
  54.  
  55. Procedure ReadMessage(Fname : PathStr);
  56. Var
  57.   Left : Word;
  58. begin
  59.   Assign(MessageFile,FName);
  60.   Reset(MessageFile,1);
  61.   BlockRead(MessageFile,Msg,190);
  62.   Left:=FileSize(MessageFile) - 190;
  63.   New(MsgTxt);
  64.   BlockRead(MessageFile,MsgTxt^,Left);
  65. end;
  66. {
  67. This will correctly read in a *.MSG File in two parts..THe Header(stored in
  68. Msg), and the Text which is a 64k buffer(stored in Pointer MsgTxt)...
  69. }
  70.